package org.jeecg.modules.basic.plan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.basic.plan.entity.LwgyMaterialPlanapplication;
import org.jeecg.modules.basic.plan.entity.LwgyMaterialPlanapplications;
import org.jeecg.modules.basic.plan.mapper.LwgyMaterialPlanapplicationMapper;
import org.jeecg.modules.basic.plan.mapper.LwgyMaterialPlanapplicationsMapper;
import org.jeecg.modules.basic.plan.service.ILwgyMaterialPlanapplicationService;
import org.jeecg.modules.basic.plan.service.ILwgyMaterialPlanapplicationsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 物料管理申请表
 * @Author: jeecg-boot
 * @Date:   2021-04-06
 * @Version: V1.0
 */
@Service
public class LwgyMaterialPlanapplicationsServiceImpl extends ServiceImpl<LwgyMaterialPlanapplicationsMapper, LwgyMaterialPlanapplications> implements ILwgyMaterialPlanapplicationsService {
    @Resource
    private LwgyMaterialPlanapplicationsMapper lwgyMaterialPlanapplicationsMapper;


    @Override
    public IPage<LwgyMaterialPlanapplications> queryPageCustomer(Page<LwgyMaterialPlanapplications> page,QueryWrapper<LwgyMaterialPlanapplications> queryWrapper,String id) {
        return page.setRecords(lwgyMaterialPlanapplicationsMapper.queryPageListCustoms(page,queryWrapper,id));
    }

    @Override
    public IPage<LwgyMaterialPlanapplications> queryPageRegisterCustomer(Page<LwgyMaterialPlanapplications> page, QueryWrapper<LwgyMaterialPlanapplications> queryWrapper) {
        return page.setRecords(lwgyMaterialPlanapplicationsMapper.queryPageListRegisterCustom(page,queryWrapper));
    }

    @Override
    public void changeState(String id, Double progress) {
        lwgyMaterialPlanapplicationsMapper.changeState(id,progress);
    }

    @Override
    public void changeInState(String id, Double inStockProgress) {
        lwgyMaterialPlanapplicationsMapper.changeInState(id,inStockProgress);
    }


}
